package com.bjpowernode.springboot.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 控制层
 */
@Controller
@RequestMapping(value = "/springboot/index")
public class IndexController {

    @RequestMapping(value = "/hello")
    @ResponseBody // 最为请求体返回，如果没有该注解，返回的string会被解析成页面，抛出404错误
    public String hello() {
        return "Hello, SpringBoot";
    }
}
